﻿namespace GreenIsomer.Web.Controls.JQuery {
	using System;
	using System.Diagnostics.CodeAnalysis;

	/// <summary>
	/// Contains event data for the GreenIsomer.Web.Controls.JQuery.PostbackField sub-control.
	/// </summary>
	[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "BackField", Justification = "It's Post-Back Field, not Post Backfield.")]
	public class PostBackFieldEventArgs : EventArgs {

		#region Members

		private string oldValue;
		private string newValue;

		#endregion

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the Greenisomer.Web.Controls.JQuery.PostbackFieldEventArgs class.
		/// </summary>
		/// <param name="oldValue">The value on the previous rendering of the page.</param>
		/// <param name="newValue">The changed current postback value sent back from the previous rendering of the page.</param>
		public PostBackFieldEventArgs(string oldValue, string newValue) {
			this.oldValue = oldValue;
			this.newValue = newValue;
		}

		#endregion


		#region Properties

		/// <summary>
		/// The value on the previous rendering of the page.
		/// </summary>
		public virtual string OldValue {
			get { return oldValue; }
			protected set { oldValue = value; } 
		}

		/// <summary>
		/// The changed current postback value sent back from the previous rendering of the page.
		/// </summary>
		public virtual string NewValue {
			get { return newValue; }
			protected set { newValue = value; } 
		}

		#endregion


	}

}